package com.cby.android.base.contentprovider

import android.content.Context
import android.widget.Toast

/**
 * @description: InitializeManager
 *
 * @author ChenBaoyang
 * @date 2021/10/13 15:53
 */
class InitializeManager {

    private var appContext: Context? = null

    private object SingletonHolder {
        /**
         * 返回InitManager对象
         */
        val instance = InitializeManager()
    }


    companion object {
        val instance = SingletonHolder.instance

        private const val TAG = "InitializeManager"
    }

    fun init(context: Context) {
        appContext = context.applicationContext
    }

    fun getContext() = appContext

    fun showToast(text: String) {
        Toast.makeText(appContext, text, Toast.LENGTH_SHORT).show()
    }
}